﻿using Decoration.IRepository;
using Decoration.IService;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Decoration.Service
{
    public class BaseQueryService : IBaseQueryService
    {
        IBaseQueryRepository rep;
        public BaseQueryService(IBaseQueryRepository rep)
        {
            this.rep = rep;
        }
        public T ExecuteScalar<T>(string sql, object param)
        {
            return rep.ExecuteScalar<T>(sql, param);
        }

        public IEnumerable<T> Query<T>(string sql, object param = null)
        {
            return rep.Query<T>(sql, param);
        }
    }
}
